package com.tt.fashionWebSite.domain;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@SuppressWarnings("serial")
@Entity
@Table(name = "hoa_don")
@NamedQueries({
      @NamedQuery(name = "getBillCommon", query = "SELECT c FROM HoaDon c") ,
        @NamedQuery(name = "getBillCommonId", query = "SELECT c FROM HoaDon c where c.maHD = :Id") ,
        @NamedQuery(name = "getALlBilByUser", query = "SELECT c FROM HoaDon c  where c.thongTinThanhVien.maTV = :Id")
})
public class HoaDon implements Serializable {

    public static final String GET_BILL_ALL = "getBillCommon";
    public static final String GET_BILL_ALL_ID = "getBillCommonId";
    public static final String GET_BILL_ALL_USER = "getALlBilByUser";

   @Id
   @Column(name = "MA_HD")
   private String maHD;

   @ManyToOne
   @JoinColumn(name = "MA_TV")
   private ThongTinThanhVien thongTinThanhVien;

   @Column(name = "HO_TEN_NN")
   private String hoTenNN;

   @Column(name = "SDT_NN")
   private String soDTNN;

   @Column(name = "DIA_CHI_NN")
   private String diaChiNN;

   @Column(name = "NGAY_LAP_HD")
   private Date ngayLapHD;

   @Column(name = "NGAY_NHAN")
   private Date ngayNhan;

   @Column(name = "NGAY_GIAO")
   private Date ngayGiao;

   @Column(name = "TRANG_THAI")
   private Long trangThai;

   @Column(name = "THANH_TOAN")
   private Long thanhToan;

   @Column(name = "GHI_CHU")
   private String ghiChu;

   @Column(name = "TONG_TIEN")
   private Double tongTien;



   public String getMaHD() {
      return maHD;
   }

   public void setMaHD(String maHD) {
      this.maHD = maHD;
   }

   public ThongTinThanhVien getThongTinThanhVien() {
      return thongTinThanhVien;
   }

   public void setThongTinThanhVien(ThongTinThanhVien thongTinThanhVien) {
      this.thongTinThanhVien = thongTinThanhVien;
   }

   public String getHoTenNN() {
      return hoTenNN;
   }

   public void setHoTenNN(String hoTenNN) {
      this.hoTenNN = hoTenNN;
   }

   public String getSoDTNN() {
      return soDTNN;
   }

   public void setSoDTNN(String soDTNN) {
      this.soDTNN = soDTNN;
   }

   public String getDiaChiNN() {
      return diaChiNN;
   }

   public void setDiaChiNN(String diaChiNN) {
      this.diaChiNN = diaChiNN;
   }

   public Date getNgayLapHD() {
      return ngayLapHD;
   }

   public void setNgayLapHD(Date ngayLapHD) {
      this.ngayLapHD = ngayLapHD;
   }

   public Date getNgayGiao() {
      return ngayGiao;
   }

   public void setNgayGiao(Date ngayGiao) {
      this.ngayGiao = ngayGiao;
   }

    public Long getTrangThai() {
        return trangThai;
    }

    public void setTrangThai(Long trangThai) {
        this.trangThai = trangThai;
    }

   public String getGhiChu() {
      return ghiChu;
   }

   public void setGhiChu(String ghiChu) {
      this.ghiChu = ghiChu;
   }

   public Double getTongTien() {
      return tongTien;
   }

   public void setTongTien(Double tongTien) {
      this.tongTien = tongTien;
   }

   public Date getNgayNhan() {
      return ngayNhan;
   }

   public void setNgayNhan(Date ngayNhan) {
      this.ngayNhan = ngayNhan;
   }

   public Long getThanhToan() {
      return thanhToan;
   }

   public void setThanhToan(Long thanhToan) {
      this.thanhToan = thanhToan;
   }
}
